<div class="container">

        <h1 id="pkg-overview">package quotedprintable</h1>

        <p><code>import "mime/quotedprintable"</code>

        </p><p>
Package quotedprintable implements quoted-printable encoding as specified by
<a href="http://tools.ietf.org/html/rfc2045">RFC 2045</a>.</p>


        
  


        
        

        

        

        
        
          
          
        

        
        


<p><a href="https://github.com/golang/go/blob/master/src/mime/quotedprintable/reader.go">reader.go</a> <a href="https://github.com/golang/go/blob/master/src/mime/quotedprintable/writer.go">writer.go</a> </p>

        
        

        
        

        
        
        

        
        

        
          <h2 data-kind="t" id="Reader">type <a href="https://github.com/golang/go/blob/master/src/mime/quotedprintable/reader.go#L17" title="View Source">Reader</a>  </h2>
          <p>
Reader is a quoted-printable decoder.
</p>

          
          
          
  


          
            <h3 data-kind="f" id="NewReader">func <a href="https://github.com/golang/go/blob/master/src/mime/quotedprintable/reader.go#L24" title="View Source">NewReader</a>  </h3>
            <p>
NewReader returns a quoted-printable reader, decoding from r.
</p>

            
  
    <div class="panel-group">
    
      <div class="panel panel-default" id="example-NewReader">
        <div class="panel-heading"><a class="accordion-toggle" data-toggle="collapse" href="#ex-NewReader">Example</a></div>
        <div class="panel-collapse collapse" id="ex-NewReader"><div class="panel-body">
          
          <p>Code:<span class="pull-right"><a href="?play=NewReader">play</a> </span>
          </p><pre>for _, s := range []string{
    `=48=65=6C=6C=6F=2C=20=47=6F=70=68=65=72=73=21`,
    `invalid escape: &lt;b style="font-size: 200%"&gt;hello&lt;/b&gt;`,
    "Hello, Gophers! This symbol will be unescaped: =3D and this will be written in =\r\none line.",
} {
    b, err := ioutil.ReadAll(quotedprintable.NewReader(strings.NewReader(s)))
    fmt.Printf("%s %v\n", b, err)
}</pre>
          <p>Output:</p><pre>Hello, Gophers! &lt;nil&gt;
invalid escape: &lt;b style="font-size: 200%"&gt;hello&lt;/b&gt; &lt;nil&gt;
Hello, Gophers! This symbol will be unescaped: = and this will be written in one line. &lt;nil&gt;
</pre>
        </div></div>
      </div>
    
    </div>
  

          

          
            <h3 data-kind="m" id="Reader.Read">func (*Reader) <a href="https://github.com/golang/go/blob/master/src/mime/quotedprintable/reader.go#L72" title="View Source">Read</a>  </h3>
            <p>
Read reads and decodes quoted-printable data from the underlying reader.
</p>

            
  

          
        
          <h2 data-kind="t" id="Writer">type <a href="https://github.com/golang/go/blob/master/src/mime/quotedprintable/writer.go#L12" title="View Source">Writer</a>  </h2>
          <p>
A Writer is a quoted-printable writer that implements io.WriteCloser.
</p>

          
          
          
  


          
            <h3 data-kind="f" id="NewWriter">func <a href="https://github.com/golang/go/blob/master/src/mime/quotedprintable/writer.go#L24" title="View Source">NewWriter</a>  </h3>
            <p>
NewWriter returns a new Writer that writes to w.
</p>

            
  
    <div class="panel-group">
    
      <div class="panel panel-default" id="example-NewWriter">
        <div class="panel-heading"><a class="accordion-toggle" data-toggle="collapse" href="#ex-NewWriter">Example</a></div>
        <div class="panel-collapse collapse" id="ex-NewWriter"><div class="panel-body">
          
          <p>Code:<span class="pull-right"><a href="?play=NewWriter">play</a> </span>
          </p><pre>w := quotedprintable.NewWriter(os.Stdout)
w.Write([]byte("These symbols will be escaped: = \t"))
w.Close()</pre>
          <p>Output:</p><pre>These symbols will be escaped: =3D =09
</pre>
        </div></div>
      </div>
    
    </div>
  

          

          
            <h3 data-kind="m" id="Writer.Close">func (*Writer) <a href="https://github.com/golang/go/blob/master/src/mime/quotedprintable/writer.go#L67" title="View Source">Close</a>  </h3>
            <p>
Close closes the Writer, flushing any unwritten data to the underlying
io.Writer, but does not close the underlying io.Writer.
</p>

            
  

          
            <h3 data-kind="m" id="Writer.Write">func (*Writer) <a href="https://github.com/golang/go/blob/master/src/mime/quotedprintable/writer.go#L31" title="View Source">Write</a>  </h3>
            <p>
Write encodes p using quoted-printable encoding and writes it to the
underlying io.Writer. It limits line length to 76 characters. The encoded
bytes are not necessarily flushed until the Writer is closed.
</p>

<div class="clearfix" id="x-footer">
  <div class="container">
    <a href="http://studygolang.com/" target="_blank">Go语言中文网</a>
    <span class="text-muted">|</span> <a href="http://golang.org/" target="_blank">Go Language</a>
    <span class="pull-right"><a href="#">Back to top</a></span>
  </div>
</div>
<script src="../assets/jquery-2.0.3.min.js"></script>
<script src="../assets/bootstrap.min.js"></script>
<script src="../assets/site.js"></script>


</div>